import javax.swing.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

public class FindPanel extends JPanel implements ActionListener {
    private Icon bgOff = Util.getIcon("/images/buttonOff.jpg");
    private ATM frame;
    private JButton offButton = new JButton(bgOff);

    public FindPanel(ATM frame) {
        this.frame = frame;
        this.setLayout(null);
        this.setOpaque(false);

        offButton.setBounds(300, 600, 100, 50);
        this.add(offButton);
        offButton.addActionListener(this);
    }

    @Override
    public void actionPerformed(ActionEvent e) {
        if (e.getSource() == offButton) {
            frame.switchPanel("menu");
        }
    }
}
